package cn.itlaobing.springboot.dao.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import cn.itlaobing.springboot.dao.StudentDao;
import cn.itlaobing.springboot.entity.Student;
@Repository
public class StudentDaoImpl implements StudentDao{
	@Autowired
	private JdbcTemplate jdbcTemplate;
	@Transactional
	@Override
	public Student save(String name, String gender, Date birthday) {
		String sql="insert into students(name,gender,birthday) values(?,?,?)";
		jdbcTemplate.update(sql, name, gender,birthday);
		return null;
	}

}
